#ifndef _FIG_ENEMY_CRAFT_H_
#define _FIG_ENEMY_CRAFT_H_


#include "fig_craft.h"
#include "fig_pickup.h"

#include "ui/ui_manager.h"

class FIGBulletManager;

class FIGEnemyCraft : public FIGCraft 
{
public:



	enum ENEMY_TYPES
	{
		ENEMY_TYPES_NONE,					
		ENEMY_TYPES_NORMAL,		
		ENEMY_TYPES_TEST,
		ENEMY_TYPES_FORMATION,
		ENEMY_TYPES_TRIANGLE,				
		ENEMY_TYPES_BACKATTACKER,
		ENEMY_TYPES_SPACEROCK_SLOW,
		ENEMY_TYPES_SPACEROCK_FAST,
		ENEMY_TYPES_SPACEROCK_DECAL,

		ENEMY_TYPES_MINIBOSS_START,
		ENEMY_TYPES_MINIBOSS_HULK,
		ENEMY_TYPES_MINIBOSS_COBRA,			
		ENEMY_TYPES_MINIBOSS_MEGANITO,
		ENEMY_TYPES_MINIBOSS_FOX,	
		ENEMY_TYPES_MINIBOSS_PRON, 		
		ENEMY_TYPES_MINIBOSS_BOMBER,
		ENEMY_TYPES_MINIBOSS_WOLF,
		ENEMY_TYPES_MINIBOSS_SHARK,
		ENEMY_TYPES_MINIBOSS_HADIEZ,
		ENEMY_TYPES_MINIBOSS_PLATO,
		ENEMY_TYPES_MINIBOSS_END,


		ENEMY_TYPES_DRAGON,

		ENEMY_TYPES_BOSS_HUMMER,
		ENEMY_TYPES_BOSS_BEAST,
		ENEMY_TYPES_BOSS_BOFFER,
		ENEMY_TYPES_BOSS_DESTORYER,
		ENEMY_TYPES_BOSS_ELECTRO,
		ENEMY_TYPES_BOSS_EYE,
		ENEMY_TYPES_BOSS_MEGA,
		ENEMY_TYPES_BOSS_PYRO,
		ENEMY_TYPES_BOSS_VIPER,
		ENEMY_TYPES_BOSS_GYVER,
		ENEMY_TYPES_BOSS_MONSTER,
		ENEMY_TYPES_BOSS_EAGLE,
		ENEMY_TYPES_BOSS_U14,


		ENEMY_TYPES_COUNT


	};
	
	FIGEnemyCraft(ENEMY_TYPES EnemyType);
	

	virtual void				Render(const math::Vec2& Offset, float Scale);
	virtual void				Tick(float dt);
	
	void						InitSpawning(
										float Dealy,
										float PosX,
										FIGPickup::PICKUP_TYPES PickupType
										);
	
	
	virtual bool				IsReadyToSpawn() { return IsAlive() == false; };
	
	static std::string			MapTypeToName(ENEMY_TYPES Type);
	static ENEMY_TYPES			MapNameToType(const std::string& Name);
		
	static std::string			MapTypeToBoneFile(ENEMY_TYPES Type);
	const ENEMY_TYPES			GetEnemeyType() const { return m_EnemyType; };
	
protected:

	virtual void				OnDie();
	virtual bool				Tick_ComeIn(float dt,float BottomLimit); 	
	
	void						MoveAbit(float dt, float BottomLimit);
	void						AimToPlayer(float dt);

	float						m_RotationSpeed;
	float						m_TargetRotation;     
	
	float						m_Accel;
	float						m_DelaySpawn;
	math::Counter				m_MoveAbitCounter;
	math::Vec2					m_MoveAbitDir;
	FIGPickup::PICKUP_TYPES		m_SpawnPickup;
	bool						m_IsBoss;
	ENEMY_TYPES					m_EnemyType;


};

#endif
